﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BonjourHotel.Model;

namespace BonjourHotel.Core.Counties
{
    public class CountyFacade : FacadeBase<BonjourHotel.Model.County>
    {
        public List<County> GetAllCounties(int idCountry)
        {
            var Counties = from county in base.ObjectContext.Counties.Include("Country")
                           where county.Country.idCountry == idCountry
                           orderby county.Name
                           select county;

            return Counties.ToList();                         
        }
    }
}
